<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    new Promise((resolve,reject)=>{
        setTimeout(()=>{
            resolve("ok");
            //reject("err");
        },1000);
    }).then(res=>{
        console.log(res);
    },err=>{
        console.log(err);
    });
</script>
</html>

